﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace CloverNet.Authorization
{
    public class DefaultPermissionProvider : IPermissionProvider
    {
        internal static DefaultPermissionProvider _instance;

        public static DefaultPermissionProvider Current
        {
            get => _instance ?? new DefaultPermissionProvider();
            set => _instance = value;
        }

        public virtual IEnumerable<object> GetPermissions()
        {
            return Enumerable.Empty<object>();
        }

        IEnumerable<object> IPermissionProvider.GetPermissions()
        {
            return Current.GetPermissions();
        }
    }
}
